package cn.silver.module.message.domain;

import cn.silver.framework.core.utils.DateUtils;
import cn.silver.framework.mybatis.annotation.Table;
import cn.silver.framework.mybatis.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.util.Date;

/**
 * @author zhouxiaobo
 */
@Data
@NoArgsConstructor
@Table(name = "msg_message_user")
@EqualsAndHashCode(callSuper = true)
@Schema(name = "MsgMessageUser", title = "系统消息通知-接收对象表")
public class MsgMessageUser extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 消息ID
     */
    @Schema(title = "消息ID")
    private String messageId;
    /**
     * 推送渠道
     */
    @Schema(title = "推送渠道")
    private String channel;
    /**
     * 接收人
     */
    @Schema(title = "接收人")
    private String userId;
    /**
     * 接收人名称
     */
    @Schema(title = "接收人名称")
    private String userName;
    /**
     * 接收人工号
     */
    @Schema(title = "接收人工号")
    private String workNo;
    /**
     * 手机号
     */
    @Schema(title = "手机号")
    private String mobile;
    /**
     * 邮箱
     */
    @Schema(title = "邮箱")
    private String email;
    /**
     * 发送状态
     */
    @Schema(title = "发送状态")
    private String status;
    /**
     * 发送时间
     */
    @Schema(title = "发送时间")
    @JsonFormat(timezone = DateUtils.TIME_ZONE, pattern = DateUtils.YYYY_MM_DD_HH_MM_SS)
    private Date sendTime;
    /**
     * 发送次数
     */
    @Schema(title = "发送次数")
    private Integer sendNum;
}
